/*
 * @Descripttion: your project
 * @version: 1.0
 * @Author: hongweixun
 * @Date: 2023-05-17 14:24:37
 * @LastEditors: liyin 2179253556@qq.com
 * @LastEditTime: 2025-08-29 10:16:16
 */
import { defineStore } from 'pinia'

export const PiniaStore = defineStore('main', {
    state: () => {
        return {
            schoolList: [] as any,
            payStatistics: {} as any,
            monitorList: {} as any,
            monitorList2: {} as any,
            schoolStatistics: {} as any,
            ratioList: [] as any,
            choiceIndex: 1,
            sandianList: [] as any,
            zhexianList: [] as any,
            refuldList: [] as any,
            schoolRefuldList: {} as any,
            loddingNum: 0
        }
    },
    persist: {
        key: 'main',
        storage: window.sessionStorage
    },
    actions: {
        setLoddingStatus () {
            this.loddingNum=this.loddingNum+1
        },
        setLoddingNum () {
            this.loddingNum=0
        },
        setSchoolList (params:any) {
            this.schoolList = params
        },
        setpayStatistics (params:any) {
            this.payStatistics = params
        },
        setMonitorList (params:any) {
            this.monitorList = params
        },
        setMonitorList2 (params:any) {
            this.monitorList2 = params
        },
        setSchoolStatistics (params:any) {
            this.schoolStatistics = params
        },
        setRatioList (params:any) {
            this.ratioList = params
        },
        setSandianList (params:any) {
            this.sandianList = params
        },
        setZhexian (params:any) {
            this.zhexianList = params
        },
        setRefuldStatistics (params:any) {
            this.refuldList = params
        },
        setSchoolRefuldStatistics (params:any) {
            console.log(params)
            this.schoolRefuldList = params
        },
        setChoiceIndex (params:any) {
            this.choiceIndex = params
        }
    }
})
